<template>
	<view>
		<uni-nav-bar @clickLeft="toback" backgroundColor="#ffffff" left-icon="back" color="#15151B" :fixed="true"
			:statusBar="true" :border="false"></uni-nav-bar>
		<web-view :src="src"></web-view>
		<!-- <web-view :webview-styles="webviewStyles" :src="src"></web-view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src:'',
				url:'',
				backtype:1,//返回方式1一级页面，2非一级
			}
		},
		methods: {
			toback() {
				if(this.backtype == 1){
					uni.switchTab({
						url: this.url,
					})
				}else{
					uni.redirectTo({
						url: this.url,
					})
				}
			},
		},
		onLoad(options) {
			// console.log(options)
			// this.src = options.src;
			let uid = uni.getStorageSync('uid');
			let token = uni.getStorageSync('token');
			this.src = uni.getStorageSync('src') +'?uid='+uid+'&token='+token;
			console.log(this.src)
			this.url = options.url;
			this.backtype = options.backtype;
		},
	}
</script>

<style>

</style>
